<template>
    <div class="login-container">
        <div class="login-header">
            <div class="logo-box">
                <img src="@/assets/image/login.png" alt="logo" class="login-img" />
            </div>
            <div class="login-title">器物标签</div>
        </div>
        <div class="login-form">
            <input class="login-input" type="text" placeholder="账号" />
            <input class="login-input" type="password" placeholder="密码" />
            <button class="login-btn">登录</button>
            <div class="login-links">
                <span class="link" @click="handleForgotPwd">忘记密码</span>
                <span class="help-link" @click="handleHelp">客服</span>
                <span class="application-link" @click="handleApplication">申请</span>
            </div>
        </div>
        <div class="quick-login">
            <div class="quick-login-item">
                <img src="https://img.icons8.com/ios-filled/50/000000/weixing.png" class="quick-icon" />
                <div class="quick-text">微信一键登录</div>
            </div>
            <div class="quick-login-item">
                <img src="https://img.icons8.com/ios-filled/50/000000/mac-os.png" class="quick-icon" />
                <div class="quick-text">手机一键登录</div>
            </div>
        </div>
        <div class="agreement">
            <input type="checkbox" id="agree" class="checkbox" />
            <label for="agree">同意《用户注册协议及隐私政策》</label>
        </div>
    </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
const router = useRouter()
const handleHelp = () => {
    router.push('/help')
}
const handleApplication = () => {
    router.push('/application')
}
const handleForgotPwd = () => {
    console.log('修改密码')
    router.push('/forgotPwd')
}
</script>

<style scoped>
.login-container {
    max-width: 350px;
    margin: 80px auto;
    padding: 24px 16px;
    background: #fff;
    min-height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 32px;
}

.logo-box {
    width: 100px;
    height: 100px;
    background: #2ed573;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.logo-img {
    width: 60px;
    height: 60px;
}

.login-title {
    font-size: 22px;
    color: #222;
    font-weight: 500;
    margin-top: 8px;
}

.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-input {
    width: 100%;
    height: 40px;
    margin-bottom: 16px;
    border: none;
    border-bottom: 1px solid #eee;
    font-size: 16px;
    padding: 0 8px;
    background: #fafafa;
    outline: none;
}

.login-btn {
    width: 100%;
    height: 44px;
    background: #ff8247;
    color: #fff;
    border: none;
    border-radius: 22px;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 12px;
    cursor: pointer;
}

.login-links {
    width: 100%;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #ff8247;
    margin-bottom: 16px;
}

.link {
    cursor: pointer;
}

.quick-login {
    width: 100%;
    display: flex;
    justify-content: space-around;
    margin: 32px 0 16px 0;
}

.quick-login-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quick-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
    opacity: 0.5;
}

.quick-text {
    font-size: 13px;
    color: #888;
}

.agreement {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #888;
    margin-top: 8px;
}

.checkbox {
    margin-right: 6px;
}
</style>